home *** CD-ROM | disk | FTP | other *** search
/ Inter.Net 55-1 / Inter.Net 55-1.iso / CBuilder / Setup / BCB / data.z / dde.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-02-09  |  5.0 KB  |  172 lines

  1. /*****************************************************************************\
  2. *                                                                             *
  3. * dde.h -       Dynamic Data Exchange structures and definitions              *
  4. *                                                                             *
  5. * Copyright (c) 1993-1996, Microsoft Corp.    All rights reserved                  *
  6. *                                                                             *
  7. \*****************************************************************************/
  8. #ifndef _DDEHEADER_INCLUDED_
  9. #define _DDEHEADER_INCLUDED_
  10. #pragma option push -b -w-bbf
  11.  
  12. #ifndef _WINDEF_
  13.  
  14. #include <windef.h>
  15.  
  16. #endif
  17.  
  18. #ifdef __cplusplus
  19. extern "C" {
  20. #endif
  21.  
  22. // begin_r_dde
  23.  
  24. /* DDE window messages */
  25.  
  26. #define WM_DDE_FIRST        0x03E0
  27. #define WM_DDE_INITIATE     (WM_DDE_FIRST)
  28. #define WM_DDE_TERMINATE    (WM_DDE_FIRST+1)
  29. #define WM_DDE_ADVISE        (WM_DDE_FIRST+2)
  30. #define WM_DDE_UNADVISE     (WM_DDE_FIRST+3)
  31. #define WM_DDE_ACK            (WM_DDE_FIRST+4)
  32. #define WM_DDE_DATA            (WM_DDE_FIRST+5)
  33. #define WM_DDE_REQUEST        (WM_DDE_FIRST+6)
  34. #define WM_DDE_POKE            (WM_DDE_FIRST+7)
  35. #define WM_DDE_EXECUTE        (WM_DDE_FIRST+8)
  36. #define WM_DDE_LAST            (WM_DDE_FIRST+8)
  37.  
  38. // end_r_dde
  39.  
  40. /*----------------------------------------------------------------------------
  41. |       DDEACK structure
  42. |
  43. |    Structure of wStatus (LOWORD(lParam)) in WM_DDE_ACK message
  44. |       sent in response to a WM_DDE_DATA, WM_DDE_REQUEST, WM_DDE_POKE,
  45. |       WM_DDE_ADVISE, or WM_DDE_UNADVISE message.
  46. |
  47. ----------------------------------------------------------------------------*/
  48.  
  49. typedef struct {
  50.         unsigned short bAppReturnCode:8,
  51.                  reserved:6,
  52.                  fBusy:1,
  53.          fAck:1;
  54. } DDEACK;
  55.  
  56.  
  57. /*----------------------------------------------------------------------------
  58. |       DDEADVISE structure
  59. |
  60. |    WM_DDE_ADVISE parameter structure for hOptions (LOWORD(lParam))
  61. |
  62. ----------------------------------------------------------------------------*/
  63.  
  64. typedef struct {
  65.         unsigned short reserved:14,
  66.                  fDeferUpd:1,
  67.          fAckReq:1;
  68.     short     cfFormat;
  69. } DDEADVISE;
  70.  
  71.  
  72. /*----------------------------------------------------------------------------
  73. |       DDEDATA structure
  74. |
  75. |       WM_DDE_DATA parameter structure for hData (LOWORD(lParam)).
  76. |       The actual size of this structure depends on the size of
  77. |       the Value array.
  78. |
  79. ----------------------------------------------------------------------------*/
  80.  
  81. typedef struct {
  82.     unsigned short unused:12,
  83.                  fResponse:1,
  84.                  fRelease:1,
  85.                  reserved:1,
  86.                  fAckReq:1;
  87.     short     cfFormat;
  88.     BYTE     Value[1];
  89. } DDEDATA;
  90.  
  91.  
  92. /*----------------------------------------------------------------------------
  93. |    DDEPOKE structure
  94. |
  95. |    WM_DDE_POKE parameter structure for hData (LOWORD(lParam)).
  96. |       The actual size of this structure depends on the size of
  97. |       the Value array.
  98. |
  99. ----------------------------------------------------------------------------*/
  100.  
  101. typedef struct {
  102.     unsigned short unused:13,  /* Earlier versions of DDE.H incorrectly */
  103.                              /* 12 unused bits.                       */
  104.          fRelease:1,
  105.          fReserved:2;
  106.     short    cfFormat;
  107.     BYTE     Value[1];  /* This member was named rgb[1] in previous */
  108.                             /* versions of DDE.H                        */
  109.  
  110. } DDEPOKE;
  111.  
  112. /*----------------------------------------------------------------------------
  113. The following typedef's were used in previous versions of the Windows SDK.
  114. They are still valid.  The above typedef's define exactly the same structures
  115. as those below.  The above typedef names are recommended, however, as they
  116. are more meaningful.
  117.  
  118. Note that the DDEPOKE structure typedef'ed in earlier versions of DDE.H did
  119. not correctly define the bit positions.
  120. ----------------------------------------------------------------------------*/
  121.  
  122. typedef struct {
  123.         unsigned short unused:13,
  124.                  fRelease:1,
  125.                  fDeferUpd:1,
  126.          fAckReq:1;
  127.     short     cfFormat;
  128. } DDELN;
  129.  
  130. typedef struct {
  131.     unsigned short unused:12,
  132.                  fAck:1,
  133.                  fRelease:1,
  134.                  fReserved:1,
  135.                  fAckReq:1;
  136.     short     cfFormat;
  137.     BYTE     rgb[1];
  138. } DDEUP;
  139.  
  140.  
  141. /*
  142.  * DDE SECURITY
  143.  */
  144.  
  145. BOOL
  146. WINAPI
  147. DdeSetQualityOfService(
  148.     HWND hwndClient,
  149.     CONST SECURITY_QUALITY_OF_SERVICE *pqosNew,
  150.     PSECURITY_QUALITY_OF_SERVICE pqosPrev);
  151.  
  152. BOOL
  153. WINAPI
  154. ImpersonateDdeClientWindow(
  155.     HWND hWndClient,
  156.     HWND hWndServer);
  157.  
  158. /*
  159.  * DDE message packing APIs
  160.  */
  161. LONG APIENTRY PackDDElParam(UINT msg, UINT uiLo, UINT uiHi);
  162. BOOL APIENTRY UnpackDDElParam(UINT msg, LONG lParam, PUINT puiLo, PUINT puiHi);
  163. BOOL APIENTRY FreeDDElParam(UINT msg, LONG lParam);
  164. LONG APIENTRY ReuseDDElParam(LONG lParam, UINT msgIn, UINT msgOut, UINT uiLo, UINT uiHi);
  165.  
  166. #ifdef __cplusplus
  167. }
  168. #endif
  169.  
  170. #pragma option pop
  171. #endif // _DDEHEADER_INCLUDED_
  172.